home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Headers / btree / IXPostingSet.h < prev    next >
Encoding:
Text File  |  1993-03-31  |  1.9 KB  |  54 lines

  1. /*
  2. IXPostingSet.h
  3. Copyright 1991,NeXT Computer,Inc.
  4. */
  5.  
  6. #import    <objc/Object.h>
  7. #import "protocols.h"
  8.  
  9. // This class implements a dynamic array of postings, sorted by handle.  Its 
  10. // primary use is for combining sets of postings - i.e., performing set union, 
  11. // intersection and subtraction.
  12.  
  13. @interface IXPostingSet: Object <NXTransport, IXPostingExchange, IXPostingOperations>
  14. {
  15. @public
  16.     unsigned        thisElement;
  17.     unsigned         numElements;
  18.     unsigned         maxElements;
  19.     struct IXPosting    *postings;
  20. }
  21.  
  22. // These two methods initialize the posting set with existing postings.  The
  23. // first method takes the postings from an object that conforms to the posting 
  24. // exchange protocol.  The second one takes the postings from the caller.
  25.  
  26. - initWithPostingsIn:(id <IXPostingExchange>)anObject;
  27. - initCount:(unsigned)theCount andPostings:(const IXPosting *)thePostings;
  28.  
  29. // These methods perform set union, intersection and subtraction between the 
  30. // posting set and an object that conforms to the posting exchange protocol, 
  31. // leaving the result in the posting set.  These are commonly used to refine or 
  32. // expand query results on a posting cursor.
  33.  
  34. - formUnionWithPostingsIn:(id <IXPostingExchange>)anObject;
  35. - formIntersectionWithPostingsIn:(id <IXPostingExchange>)anObject;
  36. - subtractPostingsIn:(id <IXPostingExchange>)anObject;
  37.  
  38. // This method sets the posting set to a specific position or element.  The 
  39. // numbering starts with zero.  The count is returned by the count method.
  40.  
  41. - (unsigned)setPosition:(unsigned)aPosition;
  42.  
  43. - setCount:(unsigned)theCount // sets the postings without copying.
  44.     andPostings:(IXPosting *)thePostings byCopy:(BOOL)aBoolean;
  45.  
  46. // The posting set can be archived to and unarchived from a typed stream.  It 
  47. // can also be passed between processes using the distributed object substrate.
  48.  
  49. - read:(NXTypedStream *)typedStream;
  50. - write:(NXTypedStream *)typedStream;
  51.  
  52. @end
  53.  
  54.